<template>
  <div>
    <el-container>
      <el-header>
        <myhead></myhead>
      </el-header>
      <el-main>
        <div class="loginbox">
          <h3 style="text-align:center;margin-bottom: 40px;">请假服务</h3>
          <el-form ref="form" :model="form" label-width="80px">
            <el-form-item label="公司Id">
              <el-input v-model="form.companyId"></el-input>
            </el-form-item>
            <el-form-item label="员工工号">
              <el-input v-model="form.uid"></el-input>
            </el-form-item>
            <el-form-item label="审核关系" v-if="true">
              <el-input type="textarea" v-model="form.relationship"></el-input>
            </el-form-item>
            <div style="text-align:center;">
              <el-button type="primary" @click="onSubmit">登录</el-button>
              <!-- <el-button>取消</el-button> -->
            </div>
          </el-form>
        </div>
      </el-main>
    </el-container>
  </div>
</template>
<script>
import myhead from "@/layout/myhead";
import { setDataBySession, getDataBySession, delDataBySession } from "@/utils";
export default {
  data() {
    return {
      form: {
        companyId: "A",
        uid: "",
        relationship: `[{"id":"1","name":"测试","fid":"2"},{"id":"2","name":"张三","fid":"3"},{"id":"3","name":"李四","fid":"4"},{"id":"4","name":"王五"}]`
      }
    };
  },
  components: {
    myhead
  },
  methods: {
    onSubmit() {
      setDataBySession("UserInfo", JSON.stringify(this.form));
      this.$router.push({ path: "/home" });
    }
  }
};
</script>
<style scoped>
.loginbox {
  width: 400px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #ccc;
  padding: 40px 20px;
}
</style>